console.log('【初始化main.js】');
//
import './env.js';
//引入第三方库
import Vue from 'vue';
//引入自定义
import store from './store';
import App from './App';
//
import $app from './utils/app';
//初始化组件
import navbar from './components/sl-navbar';
import statusbar from './components/sl-statusbar';
import sticky from '@/components/sl-sticky';
import image from '@/components/sl-image'
import flooter from './components/sl-flooter';
import page from './components/sl-page';
import pageComplete from './components/sl-pageComplete';
import loading from './components/sl-transition/loading';
import nodata from './components/sl-transition/nodata';
//注册全局组件
Vue.component('sl-navbar', navbar);
Vue.component('sl-statusbar', statusbar);
Vue.component('sl-sticky', sticky);
Vue.component('sl-image', image);
Vue.component('sl-flooter', flooter);
Vue.component('sl-page', page);
Vue.component('sl-pageComplete', pageComplete);
Vue.component('sl-loading', loading);
Vue.component('sl-nodata', nodata);
//
// import './static/icons/index.js'
import ZPInterceptor from '@/uni_modules/z-paging/components/z-paging/js/z-paging-interceptor'
ZPInterceptor.handleQuery((pageNo, pageSize, from, lastItem) => {
	let param = {
		'pageIndex': pageNo,
		'pageSize': pageSize
	}
	// 判断 Vue.prototype.param 是否需要更新
	if (JSON.stringify(Vue.prototype.param) !== JSON.stringify(param)) {
		Vue.prototype.param = param;
	}
	return [pageNo, pageSize, from];
})

//配置Vue属性
Vue.config.productionTip = false
//H5处理
App.mpType = 'app'
//挂载全局app
Vue.prototype.$app = $app;
//挂载全局Bus
Vue.prototype.$Bus = new Vue();
//
const app = new Vue({
	...App,
	store
});
app.$mount();